//
//  RNMJiLei.m
//  猫狗交流器
//
//  Created by apple on 2018/8/14.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "RNMJiLei.h"


@interface RNMJiLei ()

@end

@implementation RNMJiLei



- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.whiteColor;
    
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    [self setupBaseNavi];
    
}

- (void)setupBaseNavi {
    //导航栏及状态栏
    [self.navigationController.navigationBar setHidden:NO];
    //    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
    //设置标题属性
    self.navigationController.navigationBar.titleTextAttributes = @{NSFontAttributeName:hhy_kFont(18), NSForegroundColorAttributeName:[UIColor whiteColor]};
    //导航栏标题
    [self.navigationController.navigationBar setBackgroundImage:[UIImage xl_imageWithColor:rgba(255, 78, 19, 1) size:CGSizeMake(hhy_kScreenWidth, hhy_kStatusBarAndNavigationBarHeight)] forBarMetrics:UIBarMetricsDefault];
    [self.navigationController.navigationBar setShadowImage:[UIImage xl_imageWithColor:rgba(255, 78, 19, 1) size:CGSizeMake(hhy_kScreenWidth, 1.0f)]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)hhy_backAction {
//    NSLog(@"p = %@, c = %ld", self.presentationController, self.navigationController.viewControllers.count);
    dispatch_async(dispatch_get_main_queue(), ^{
        if (self.presentingViewController && (self.navigationController.viewControllers.count == 1||self.navigationController.viewControllers.count == 0)) {
            [self dismissViewControllerAnimated:NO completion:nil];
        } else {
            [self.navigationController popViewControllerAnimated:NO];
        }
    });
}
#pragma mark - 清除数据
- (void)clearData {
    
}

#pragma mark - 刷新数据
- (void)updateAllData {
    
}

- (void)updateSubData {
    
}

#pragma mark - 通知相关
//- (void)hhy_addNotication {
//    [NSNotificationCenter defaultCenter] addObserver:self selector:@selector(<#selector#>) name:<#(nullable NSNotificationName)#> object:<#(nullable id)#>;
//}
//
//- (void)hhy_removeNotication {
//
//}
//
//- (void)hhy_receiceRemoteNoti:(NSNotification *)noti {
//
//}
//
//- (void)hhy_receiceLocalNoti:(NSNotification *)noti {
//
//}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
